const Mock = require('mockjs')
let selectAll = Mock.mock({
  "data|1-10": [{
    "userName": Mock.mock('@cname'),
    "roleID": Mock.mock('@increment'),
    "siteID": Mock.mock('@increment'),
    "tel": Mock.mock('@increment(100000000)'),
    'email': Mock.mock('@email'),
  }]
})
module.exports = [
  {
    url: '/sys/user/insert',
    type: 'post',
    response: config => {
      return {
        code: 200,
        data: {
          "msg": "添加用户成功！",
          "code": 200
        },
        msg: '成功'
      }
    }
  },
  {
    url: '/sys/user/delete',
    type: 'get',
    response: config => {
      return {
        "msg": "删除用户成功！",
        "code": 200
      }
    }
  },
  {
    url: '/sys/user/update',
    type: 'post',
    response: config => {
      return {
        "msg": "修改成功！",
        "code": 200
      }
    }
  },
  {
    url: '/sys/user/selectAll',
    type: 'get',
    response: config => {
      return {
        code: 200,
        data: selectAll.data,
        msg: '成功',
      }
    }
  }
]
